From: Jasper St. Pierre Date: Tue, 3 Dec 2013 20:45:53 +0000 (-0500) Subject: background: Remove more bogus checks X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3023 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dbdc884c960e3fe05d3dc3729fd923ca706a6a35;p=gnome-shell.git background: Remove more bogus checks The content in these arrays can never be null... https://bugzilla.gnome.org/show_bug.cgi?id=719803 --- diff --git a/js/ui/background.js b/js/ui/background.js index 1f9e49490..0a21bd239 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -50,11 +50,9 @@ const BackgroundCache = new Lang.Class({ effects: Meta.BackgroundEffects.NONE }); let content = null; + let candidateContent = null; for (let i = 0; i < this._patterns.length; i++) { - if (!this._patterns[i]) - continue; - if (this._patterns[i].get_shading() != params.shadingType) continue; @@ -88,7 +86,6 @@ const BackgroundCache = new Lang.Class({ } this._patterns.push(content); - return content; }, @@ -210,11 +207,9 @@ const BackgroundCache = new Lang.Class({ onFinished: null }); let content = null; + let candidateContent = null; for (let i = 0; i < this._images.length; i++) { - if (!this._images[i]) - continue; - if (this._images[i].get_style() != params.style) continue;